/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package unc.pds.facets;

import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Iterator;
import unc.pds.filemodel.AlbumRemote;
import unc.pds.filemodel.FileRemote;
import unc.pds.filemodel.FolderRemote;
import unc.pds.filemodel.PhotoRemote;
import unc.pds.model.DiaryRemote;
import unc.pds.model.GroupRemote;
import unc.pds.model.Model;
import unc.pds.model.Newsable;
import unc.pds.model.Postable;
import unc.pds.model.UserRemote;
import unc.pds.news.News;
import unc.pds.service.ServiceBeanRemote;

/**
 *
 * @author Mikhail
 */
public class NewsFacet implements Facet {
    public NewsFacet(Newsable obj, ServiceBeanRemote service) {
        this.obj = obj;
        this.service = service;
    }
    Newsable obj;
    ServiceBeanRemote service;
    public String draw() throws RemoteException {
        String result = "";
        result += "<h4>Новости:</h4>";
        result += NewsDrawer.drawNews(obj.getNews(), service, -1);
        return result;
    }
    public boolean isSide() {
        return false;
    }
}
